package emulator.hardware.io;

import emulator.hardware.HwByte;

public class PortControlRegister {
	private HwByte value = new HwByte(0);
	
	public void setValue(int value){
		this.value.setNumber(value);
	}
	
	public int getValue() {
		return (int) value.getNumber();
	}
	
	public boolean getIrq1Mode() {
		return value.getBit(0);
	}
	
	public int getIrq0Mode() {
		return ((int)value.getNumber() >> 1) & 0x07;
	}

	public boolean getIrq4Mode() {
		return value.getBit(4);
	}
	
	public int getIrq3Mode() {
		return ((int)value.getNumber() >> 5) & 0x07;
	}
}
